package com.rfid.emergencywarehouse.adapter;

import com.rfid.emergencywarehouse.R;
import com.rfid.emergencywarehouse.entity.BarcodeInfo;

import java.util.List;

public class CreateListAdapter extends MutilChoiceScanBarCodeAdapter{
    public CreateListAdapter(List<BarcodeInfo> data) {
        super(data);
    }

    @Override
    protected void bindView(MyHolder holder, int position, BarcodeInfo t) {
        super.bindView(holder, position, t);
        BarcodeInfo barcodeInfo = mData.get(position);
        holder.model.setText("型号：" + barcodeInfo.getSkuModel());
        holder.name.setText("物料：" + barcodeInfo.getMaterialName());

    }

    @Override
    protected boolean canSelect(BarcodeInfo barcodeInfo) {
        return !barcodeInfo.isNew();
    }

    @Override
    protected int getLayout() {
        return R.layout.item_shelfing;
    }
}
